<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .box{
            width: 200px;
            height: 200px;
            background-color: blueviolet;
        }
        /*
            移动端  平板   电脑（笔记本、大屏）
            xs 超小屏幕  xs < 768px
            sm 小屏幕    768px < sm < 992px
            md 中等屏幕  992px < md < 1200px
            lg 大屏幕    1200px < lg
        */
        @media only screen and (max-width: 1200px) {
            .box{
                background-color: burlywood;
            }
        }
        @media (max-width: 992px) {
            .box{
                background-color: lightblue;
            }
        }
        @media (max-width: 768px) {
            .box{
                background-color: cyan;
            }
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>